﻿<%@ Page Language="C#" MasterPageFile="~/Member/UserManage.master" AutoEventWireup="true"
    CodeFile="MemberProductList.aspx.cs" Inherits="Member_Trade_MemberProductList"
    Title="管理我加入的产品库" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="Server">
<script type="text/javascript" src="../../js/jquery.js"></script>
    <script type="text/javascript">
    
         function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
    </script>

    <div id="sub_content"> 
            <div class="pagetitle">
                产品管理</div>
			<div class="tishi">
            <span>提&nbsp;示：</span>
			<p>·修改信息：审核通过才能上网，可以增加商机有效期及提升信息排名。</p>
			<p>·过期信息：建议您重发有用的过期信息，信息过期6个月后将被系统自动删除！批量重发过期信息</p>
			<div class="clr"></div>
			</div>
			<div class="main_Supply_nav" >
                <ul id="menu">
                <li id="menu5" runat="server"><asp:Label ID="Label1" runat="server"><a href="?v=0">所有信息</a></asp:Label></li>
				<li id="menu1" runat="server" ><asp:Label ID="Label2" runat="server"><a href="?v=1">产品已审核</a></asp:Label></li>
				<li id="menu2" runat="server" ><asp:Label ID="Label3" runat="server"><a href="?v=2">产品未审核</a></asp:Label></li>
				<li id="menu3" runat="server"><asp:Label ID="Label4" runat="server"><a href="?v=3">请求靠前</a></asp:Label></li>
				<li id="menu4" runat="server"><asp:Label ID="Label6" runat="server"><a href="?v=4">已请求靠前</a></asp:Label></li>
				</ul>
            </div>
    <div class="talbe_border">
        <asp:GridView ID="gvProducts" runat="server" CssClass="table_main" CellPadding="0"
            GridLines="None" AutoGenerateColumns="False" DataKeyNames="ID" OnRowDataBound="gvProducts_RowDataBound">
            <Columns>
                <asp:TemplateField HeaderText="选项">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" />
                    </ItemTemplate>
                    <HeaderStyle CssClass="th20 tou" />
                    <ItemStyle CssClass="nolet" />
                </asp:TemplateField>
                <asp:TemplateField Visible="False">
                    <ItemTemplate>
                        <asp:Label ID="lblId" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="公司名称">
                    <ItemTemplate>
                        <%# Eval("CompanyName") %>
                    </ItemTemplate>
                    <ItemStyle CssClass="left2" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="产品名称">
                    <ItemTemplate>
                        <%# Eval("Name") %>
                    </ItemTemplate>
                    <ItemStyle CssClass="th80" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="是否靠前">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, "IsTop").ToString()== "True" ? "是" : "否"%>
                    </ItemTemplate>
                    <ItemStyle CssClass="th30" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="要求">
                    <ItemTemplate>
                        <%# Eval("Ask") %>
                    </ItemTemplate>
                    <ItemStyle CssClass="th30" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="有效期至">
                    <ItemTemplate>
                        <asp:Label ID="Label9" runat="server" Text='<%# GetShortDate(Eval("LastDate").ToString()) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="th30" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="申请日期">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# GetShortDate(Eval("AddDate").ToString()) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="th30" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="产品审核">
                    <ItemTemplate>
                        <span>
                            <%#  ShowVerify(Eval("Verify").ToString())  %>
                        </span>
                    </ItemTemplate>
                    <ItemStyle CssClass="th30" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <a href='MemberProductEdit.aspx?productID=<%# Eval("ID") %>'>编辑</a> |
                        <asp:LinkButton ID="lbtnDelete" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID")%>'
                            Font-Underline="false" Text="删除" OnCommand="lbtnDelete_Command" OnClientClick="return confirm('你确定要删除吗?')"></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle CssClass="th80" />
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="header" />
        </asp:GridView>
        <div class="paging">
            <p>
                <uc1:PageNo ID="PageNo1" runat="server" />
            </p>
            <input id="CheckBox2" name="CheckBox2" onclick="SelectAll();" type="checkbox" />全选
            <asp:Button ID="btnDelete" runat="server" CssClass="i_button" Text="批量删除" OnClientClick="return confirm('你确定要删除吗？')" OnClick="btnDelete_Click" />
            <asp:Label ID="lblMessage" runat="server" Visible="false"></asp:Label>
        </div>
    </div>
	</div>
</asp:Content>
